﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace Inspinia_MVC5.Data
{
    public class BooksSystemContext : DbContext
    {
        // You can add custom code to this file. Changes will not be overwritten.
        // 
        // If you want Entity Framework to drop and regenerate your database
        // automatically whenever you change your model schema, please use data migrations.
        // For more information refer to the documentation:
        // http://msdn.microsoft.com/en-us/data/jj591621.aspx
    
        public BooksSystemContext() : base("name=BooksSystemContext")
        {
            Database.SetInitializer(new DropCreateDatabaseIfModelChanges<BooksSystemContext>());
        }
        
        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Admin> Admins { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Department> Departments { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Class> Classes { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Student> Students { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Ebook> Ebooks { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.BookType> BookTypes { get; set; }

        //public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Book> Books { get; set; }

        //public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Borrow> Borrows { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Book> Books { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Borrow> Borrows { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Teacher> Teachers { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.ZhengDing> ZhengDings { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Message> Messages { get; set; }

        public System.Data.Entity.DbSet<Inspinia_MVC5.Models.Email> Emails { get; set; }
    }
}
